Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alternative setup instructions through Anaconda #139

Closed

Conversation

ohadmo
Copy link
Member

@ohadmo ohadmo commented Oct 28, 2020

Resolves #112

Tested with gpuci/miniconda-cuda:11.0-devel-ubuntu20.04

Our gpuCI images, which are shared among all our projects, do not install the required OS libraries through Anaconda but through the standard OS package manager. See, https://github.com/clara-parabricks/gpuci-build-environment/blob/master/Dockerfile#L32-L50. We should consider using the Anaconda-based installation steps for some combinations.

@ohadmo ohadmo added documentation Improvements or additions to documentation sdk labels Oct 28, 2020
@ohadmo ohadmo requested a review from tijyojwad October 28, 2020 06:40
@ohadmo ohadmo self-assigned this Oct 28, 2020

conda info --envs

#. Install Python requirements and VariantWorks package from source
Copy link
Member Author

@ohadmo ohadmo Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not combine the pip installation step with theenvironment.yml file like so

-pip
   - -r file:requirements.txt

because we don't know the user-defined environment location prior to running the conda env create command to set LDFLAGS & CPPFLAGS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think it's okay to keep them separated for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using explicit package names in the environment.yml file:

  - bioconda::htslib
  - pip:
          - cyvcf2

also results in the following error when creating the environment:

also results in:
 -Wno-discarded-qualifiers
    htslib/bgzf.c:38:10: fatal error: zlib.h: No such file or directory
       38 | #include <zlib.h>
          |          ^~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1

#. Some Python packages depends on the headers and shared libraries which were installed in the previous step,
therefore before executing `pip`, run the following command:

.. code-block:: bash
Copy link
Member Author

@ohadmo ohadmo Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of defining these env variables, I tried to pass to the pip install -r requirements.txt command the following arguments:

--global-option=build_ext --global-option="-I<ENVIRONMENT_PATH>/include/" --global-option="-L<ENVIRONMENT_PATH>/lib"

or even add these arguments to the relevant entries in the requirements.txt files:

biopython==1.78
cyvcf2==0.20.1 --global-option=build_ext --global-option="-I/opt/conda/envs/<ENVIRONMENT_PATH>/include/" --global-option="-L/opt/conda/envs/<ENVIRONMENT_PATH>/lib"
h5py==2.10.0

Both of these options result in disabling the use of wheel files and build from the source all the packages in requirements.txt, as described in pypa/pip#4118 (same for the --install-option argument)

And this causes a failure to install the nemo-toolkit & pysam. ( We can overcome this issue, by using an additional requirements file- one for PyPI packages that are built from source successfully need the --global-option=build_ext command argument to build against the shared libraries and another one for packages that fails and require a precompiled .whl installation. (But in my opinion, this would confuse the user more)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can take all the requirements from requirements.txt and find the corresponding packages in the Anaconda cloud, move them to the environment.yml file and leave inside the requirements.txt only the packages that do not have an Anaconda package. this way, a user that uses Anaconda will only only to use the conda env create command

@ohadmo ohadmo changed the base branch from master to dev-v0.1.0 November 2, 2020 18:58
@tijyojwad
Copy link
Contributor

Closing for now, will reopen when prioritized

@tijyojwad tijyojwad closed this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sdk] update VariantWorks installation to be based on conda
2 participants